var express = require('express');
var router = express.Router();
let {addShop,getMerchant,updateShop,deleteShop} = require('../service/shopService');

/* 新增门店 */
router.post('/addShop', async function(req, res, next) {
    res.send(await addShop(req.body));
});

/* 获取门店 */
router.post('/getMerchant', async function(req, res, next) {
    res.send(await getMerchant(req.body));
});

/* 修改门店 */
router.post('/updateShop', async function(req, res, next) {
    res.send(await updateShop(req.body));
});

/* 删除门店 */
router.post('/deleteShop', async function(req, res, next) {
    res.send(await deleteShop(req.body));
});
module.exports = router;